<?php /*a:4:{s:61:"D:\projects\junhe\app\data\view\store\goods_models\index.html";i:1741885794;s:58:"D:\projects\junhe\app\data\view\..\..\admin\view\main.html";i:1740136709;s:59:"D:\projects\junhe\app\data\view\store\goods\form_style.html";i:1740136709;s:68:"D:\projects\junhe\app\data\view\store\goods_models\index_search.html";i:1740573605;}*/ ?>
<div class="layui-card">
    
    
    <?php if(!(empty($title) || (($title instanceof \think\Collection || $title instanceof \think\Paginator ) && $title->isEmpty()))): ?>
    <div class="layui-card-header">
        <span class="layui-icon font-s10 color-desc margin-right-5">&#xe65b;</span><?php echo htmlentities((isset($title) && ($title !== '')?$title:''),ENT_QUOTES); ?>
        <div class="pull-right">

<button data-modal='<?php echo url("add"); ?>' data-width="1200px" data-height="80%" data-title="添加型号" class='layui-btn layui-btn-sm layui-btn-primary'>添加型号</button>


<button data-action='<?php echo url("remove"); ?>' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除型号</button>

</div>
    </div>
    <?php endif; ?>
    
    <div class="layui-card-line"></div>
    <div class="layui-card-body">
        <div class="layui-card-html">
            
<style>
    .think-box-shadow table{
        margin: 0;
    }
    .layui-table td, .layui-table th {
        padding: 9px 15px !important;
    }
    .pagination-container{
        padding: 10px 10px;
    }
    .pagination span,.pagination a{
        padding: 5px 10px;
        font-size: 14px;
        border: #ccc solid 1px;

        margin: 0 5px;
    }

    .layui-card-body::-webkit-scrollbar {
        width: 3px!important;
    }
    .layui-card-body::-webkit-scrollbar-thumb {
        border-radius: 10px!important;

        /*background: #AA3130!important;*/
    }
    .layui-card-body::-webkit-scrollbar-track {

        border-radius: 10px!important;
        background: #fbfbfb!important;
    }

    .think-radio input[type=radio]{
        display: none !important;
    }

    .font-red{
        color:#AA3130;
    }
    .back-red{
        background-color:#AA3130;
    }
</style>
<div class="think-box-shadow">
    <fieldset>
    <legend>条件搜索</legend>
    <form class="layui-form layui-form-pane form-search" action="<?php echo request()->url(); ?>" onsubmit="return false" method="get" autocomplete="off">
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">商品名称</label>
            <div class="layui-input-inline">
                <input name="title" value="<?php echo htmlentities((isset($get['title']) && ($get['title'] !== '')?$get['title']:''),ENT_QUOTES); ?>" placeholder="请输入商品名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">商品列表</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="goods_id" lay-search>
                    <option value="">-- 全部商品 --</option>
                    <?php foreach($goods_list as $v): ?>
                        <option  <?php if(isset($get['goods_id']) && $get['goods_id'] == $v['id']): ?> selected <?php endif; ?> value="<?php echo htmlentities($v['id'],ENT_QUOTES); ?>"><?php echo htmlentities($v['title'],ENT_QUOTES); ?></option>
                    <?php endforeach; ?>
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">销售状态</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="status">
                    <?php foreach([''=>'- 全部 -','1'=>'正常','0'=>'停用'] as $k=>$v): if($k.'' == input('status')): ?>
                    <option selected value="<?php echo htmlentities($k,ENT_QUOTES); ?>"><?php echo htmlentities($v,ENT_QUOTES); ?></option>
                    <!--<?php else: ?>-->
                    <option value="<?php echo htmlentities($k,ENT_QUOTES); ?>"><?php echo htmlentities($v,ENT_QUOTES); ?></option>
                    <!--<?php endif; ?>-->
                    <?php endforeach; ?>
                </select>
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
        </div>
    </form>
    <script>form.render()</script>
</fieldset>
    <table class="layui-table margin-top-10" lay-skin="line">
        <?php if(!(empty($list) || (($list instanceof \think\Collection || $list instanceof \think\Paginator ) && $list->isEmpty()))): ?>
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
            </th>
            <th class='list-table-sort-td'>
                <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
            </th>
            <th>产品名称</th>
            <th>型号名称</th>
            <th>图片</th>
            <th>排序</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <?php endif; ?>
        <tbody>
        <?php foreach($list as $key=>$vo): ?>
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>' type='checkbox'></td>
            <td class='list-table-sort-td'><input data-action-blur="<?php echo request()->url(); ?>" data-value="id#<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>;action#sort;sort#{value}" data-loading="false" value="<?php echo htmlentities($vo['sort'],ENT_QUOTES); ?>" class="list-sort-input"></td>
            <td><?php echo !empty($vo['goods']) ? htmlentities($vo['goods']['title'],ENT_QUOTES) :  ''; ?></td>
            <td><?php echo htmlentities($vo['name'],ENT_QUOTES); ?></td>
            <td>
                <?php if(!(empty($vo['thumb']) || (($vo['thumb'] instanceof \think\Collection || $vo['thumb'] instanceof \think\Paginator ) && $vo['thumb']->isEmpty()))): ?>
                <img data-tips-image style="width:60px;height:60px" src="<?php echo htmlentities((isset($vo['thumb']) && ($vo['thumb'] !== '')?$vo['thumb']:''),ENT_QUOTES); ?>" class="margin-right-5 text-top">
                <?php endif; ?>
            </td>
            <td class='text-left nowrap'>
                <?php echo htmlentities($vo['sort'],ENT_QUOTES); ?>
            </td>
            <td>
                <div class="layui-row">
                    <div class="layui-col-xs2 text-center font-s10">
                        <?php if(isset($vo['status']) and $vo['status'] == 1): ?>
                       
                        <a class="layui-btn layui-btn-sm" data-action="<?php echo url('forbid'); ?>" data-value="id#<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>;status#0">上架中</a>
                     
                        
                        <?php else: ?>
                       
                        <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="<?php echo url('resume'); ?>" data-value="id#<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>;status#1">已下架</a>
                       
                        <?php endif; ?>

                    </div>
                </div>
            </td>

            <td class='text-left nowrap'>

                <div class="nowrap margin-bottom-5">
     
                    <a data-dbclick class="layui-btn layui-btn-sm" data-width="1200px" data-height="80%" data-modal='<?php echo url("edit"); ?>?id=<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>'>编 辑</a>
                   
  
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="<?php echo url('remove'); ?>" data-value="id#<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>">删 除</a>
                
 
                </div>


            </td>
        </tr>
        <?php endforeach; ?>
        </tbody>
    </table>

    <?php if(empty($list) || (($list instanceof \think\Collection || $list instanceof \think\Paginator ) && $list->isEmpty())): ?><span class="notdata">没有记录哦</span><?php else: ?><?php echo (isset($pagehtml) && ($pagehtml !== '')?$pagehtml:''); ?><?php endif; ?>

</div>

        </div>
    </div>
    
</div>